/**
 * ===========================================
 * Project: qb-common
 * ===========================================
 * Package: com.cyou.qb.common.service.mock
 * 
 * Copyright (c) 2012, CYOU All Rights Reserved.
 * ===========================================
 */
package com.cyou.qb.common.service.mock;

import java.util.ArrayList;
import java.util.List;

import com.cyou.nad.utils.DateUtils;
import com.cyou.qb.common.domain.AssignedWinner;

/**
 * <p>AwardConfigChanceServiceMock</p>
 * <p>
 * Description:
 * </p>
 *
 * @author lidongwei
 * @version 
 * @since 2012-10-12
 */
public class AwardConfigChanceServiceMock {
	/**
	 * <p>查找指定用户Mock<p>
	 * 根据activeId返回不同的数据
	 * 模拟 空数据  1条数据 和多条数据<br>
	 * 1. 一条<br>
	 * 2. 多条<br>
	 * 3. 无
	 */
	public List<AssignedWinner> findAssignedWinner(int activeId, int uCenterId) {
		List<AssignedWinner> list = new ArrayList<AssignedWinner>();

		if (activeId % 3 == 0) {
			return null;
		} else if (activeId % 3 == 1) {
			AssignedWinner winner = new AssignedWinner();
			winner.setId(1);
			winner.setAwardId(1);
			winner.setActiveId(activeId);
			winner.setuCenterId(uCenterId);
			winner.setPassport("zoudongchao@cyou-inc.com");
			winner.setMaxNum(10);
			winner.setCurrNum(5);
			winner.setCreateDate(DateUtils.parseDate("2012-01-12 23:10:10", "yyyy-MM-dd HH:mm:ss"));
			list.add(winner);
		}else if (activeId%3 == 2){
			AssignedWinner winner = new AssignedWinner();
			winner.setId(1);
			winner.setAwardId(1);
			winner.setActiveId(activeId);
			winner.setuCenterId(uCenterId);
			winner.setPassport("zoudongchao@cyou-inc.com");
			winner.setMaxNum(10);
			winner.setCurrNum(5);
			winner.setCreateDate(DateUtils.parseDate("2012-01-12 23:10:10", "yyyy-MM-dd HH:mm:ss"));
			list.add(winner);
			
			AssignedWinner winner2 = new AssignedWinner();
			winner2.setId(2);
			winner2.setAwardId(2);
			winner2.setActiveId(activeId);
			winner2.setuCenterId(uCenterId);
			winner2.setPassport("zoudongchao@cyou-inc.com");
			winner2.setMaxNum(10);
			winner2.setCurrNum(5);
			winner2.setCreateDate(DateUtils.parseDate("2012-01-12 23:10:10", "yyyy-MM-dd HH:mm:ss"));
			list.add(winner2);
		}
		//new one

		return list;
	}

}
